<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

$fp=fopen('php://input','r');
$entrada='';
while(  $data = fread( $fp, 4128 )){
    $entrada.= $data;
}
fclose($fp);
?>
<html>
    <body>
        <h3><?=$_SERVER['REQUEST_METHOD']?></h3>
        <pre><?=$data?></pre>
        <form method="PUT" action="<?=$_SERVER['PHP_SELF']?>">
            <input type="hidden" name="campo" value="1" />
            <input type="submit" name="submit" value="Submit" />
        </form>
        
    </body>
</html>